#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "RoomRegisterComponent.generated.h"

UCLASS(Blueprintable, Abstract, ClassGroup =(Room))
class PHOBIA_API URoomRegisterComponent : public UActorComponent
{
	GENERATED_BODY()

public:
	URoomRegisterComponent();

protected:
	virtual void BeginPlay() override;
	virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

private:
	UFUNCTION()
	void OnActorEnterRoom(AActor* OverlappedActor, AActor* OtherActor);

	UFUNCTION()
	void OnActorLeaveRoom(AActor* OverlappedActor, AActor* OtherActor);

public:
	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Room")
	FDataTableRowHandle RoomName;
};
